Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
“You can’t have a picture stradle two columns and have text wrap around it,” they said. “You’re crazy for trying!” they laughed.
Call me crazy, and maybe you should see a psychiatrist because it’s right in front of your eyes.
This page is written in valid XHTML 1.1 and CSS 2.0. There isn’t any special CSS used. It works in all browsers.
<body> <div id="wrapper"> <div id="leftouter"> <div id="leftinner"> </div> </div> <div id="rightouter"> <div id="rightinner"> </div> </div> </div> </body>
The “wrapper” div is used to set an overall width for the page. You probably could use the <body> tag, but I usually don’t becuase Internet Explorer 5.x/PC doesn't allow widths for the <body> tag. It’s pretty obvious that “left” and “right” are the left and right columns. You can set the leftouter and rightouter div’s to any width you want. I prefer to use percentage widths at this point. The keys to make this work are the <div> and <img> tag’s (note that the div tag only takes up half the area of the image).
<body> <div id="wrapper"> <div id="leftouter"> <div id="leftinner"> <img src="image.jpg" id="actualpicture" alt="The actual image to be displayed." /> </div> </div> <div id="rightouter"> <div id="rightinner"> <div id="floatplaceholder"></div> </div> </div> </div> </body>
The <div> and <img> tag’s are floated toward the center of the page. The <img> is floated right and the <div> is floated left. The <div> is given the full height of the image and one-half the width.
Challange completed.
Works in:
Doesn't work in:
For toicontien at the webdev forums. This is the thread.